/*
 * acm1828.c
 *
 *  Created on: 10 Apr 2010
 *      Author: xuxu
 */

#include<stdio.h>
#include<string.h>
int main()
{
	char str1[1001],str2[1001],result[1001],temp[1001];
	int n,len,len1,len2;
	int i,j;
	int t,jw;
	while(scanf("%d",&n)!=EOF)
	{
		if(1==n||2==n)
		{
			printf("1\n");
			continue;
		}
		strcpy(str1,"1");
		strcpy(str2,"1");
		for(i=3;i<=n;i++)
		{
			len1=strlen(str1)-1;
			len2=strlen(str2)-1;
			len=0;
			jw=0;
			while(len1>=0&&len2>=0)
			{
				t=str1[len1]-'0'+str2[len2]-'0'+jw;
				temp[len++]=t%10+'0';
				jw=t/10;
				len1--;
				len2--;
			}
			while(len2>=0)
			{
				t=str2[len2]-'0'+jw;
				temp[len++]=t%10+'0';
				jw=t/10;
				len2--;
			}
			if(jw)
			{
				temp[len++]='1';
			}
			for(j=0;j<len;j++)
			{
				result[j]=temp[len-j-1];
			}
			result[len]=0;
			strcpy(str1,str2);
			strcpy(str2,result);
		}
		printf("%s\n",result);
	}
	return 0;
}
